<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="{{CDN}}/easyui/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="{{CDN}}/easyui/themes/icon.css">
		<script type="text/javascript" src="{{CDN}}/easyui/jquery.min.js"></script>
		<script type="text/javascript" src="{{CDN}}/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="{{CDN}}/easyui/locale/easyui-lang-zh_CN.js"></script>
		<script>

		$(function(){
			/*表格初始化*/
			$("#grid").datagrid({
				singleSelect:true,
				fit:true,
				fitColumns:true,
				collapsible:true, 
				striped:true,
				rownumbers:true, 
			    columns:[[    
			    	{field:'CK',checkbox:true},
			        {field:'company_name',title:'企业名称',width:300,align:'left'},
			        {field:'person_name',title:'姓名',width:80,align:'left'}, 
			        {field:'sex',title:'性别',width:30,align:'left'}, 
			        {field:'identy_id',title:'证件号码',width:200,align:'left'}, 
			        {field:'school',title:'毕业学校',width:250,align:'left'},    
			        {field:'education',title:'最高学历',width:100,align:'center'},    
			        {field:'major',title:'所学专业',width:180,align:'right'},    
					{field:'technical_title',title:'技术职称',width:100,align:'right'}, 
			        {field:'data_source_code',title:'数据来源',width:50,align:'right'}
			    ]],
			    pagination:true,
			    pageSize:20,
			    pageList:[10,20,30,50,100,200,500]
			});
			
			/* 查询下拉框加载数据  */
			//
			$('#search_data_source').combobox({    
			    url:'/common/dict/getComboboxDataSourceDict',    
			    valueField:'code',
			    width:270,
			    textField:'name',
			    filter: function(q, row){
					var opts = $(this).combobox('options');
					return row[opts.textField].indexOf(q) >= 0;
				}
			});
			//$('#search_data_source').combobox('setValue','build')
			
			function query(){
				$("#grid").datagrid({
					url:'/middleLib/personMain/getPersonMainList',
					method:"POST",
					queryParams: parent.getFormJson($("#search_form"))
				});
			}
			$("#search_btn").click(function(){
				query();
			});
			
			
			
			//打开链接
			$("#open_url_btn").click(function(){
				var rows = $('#grid').datagrid('getSelections');
				if(rows.length<1){
					$.messager.alert('提示','请勾选一条');
					return false;
				}
				var url = rows[0].url;
				window.open(url);
			});
			
		});
			
		</script>
	</head>
	<body class="easyui-layout">
		
		<!-- 查询条件表单 -->
		<div id = "toolbar">
			<form id ="search_form" method="post" class="easyui-form">
				<table width="100%">
					<tr>
						<td align="right" width="5%">企业人员名称:</td>
						<td width="15%"  align="left" >
							<input class="easyui-textbox"  name="person_id" style="width:300px"  />
						</td>
						<td align="right" width="5%">数据来源:</td>
						<td width="15%"  align="left">
							<input  class="easyui-combobox" required="true" id = "search_data_source"  panelHeight='auto' name="data_source_code" style="width:100px" />
						</td>


					</tr>
				</table>

			</form>
			
			<a href="#" id="search_btn" class="easyui-linkbutton"	 data-options="iconCls:'icon-search'"  >查询</a>
			<a href="#" id='show_cert_btn' class="easyui-linkbutton" data-options="iconCls:'icon-search'">查看证书信息</a>
			<a href="#" id='open_url_btn' class="easyui-linkbutton" data-options="iconCls:'icon-reload'">打开链接页面</a>
		</div>
		
		
		
		<!-- 主表格 -->
		<div region="center" border="false">
			<table id="grid" toolbar="#toolbar" ></table>
		</div>
		
	</body>
</html>
